#ifndef BUFFER_H
#define BUFFER_H

#pragma once
#include <string>

class Buffer
{
public:
    Buffer();
    ~Buffer();
    void append(const std::string& str);
    bool isEmpty() const {
        return buff_.empty();
    }
    const char* data() const {
        return buff_.data();
    }
    size_t size() const {
        return buff_.size();
    }
    void erease(size_t pos, size_t len) {
        buff_.erase(pos, len);
    }
    void clear() {
        buff_.clear();
    }
    void send(const std::string& str);
private:
    std::string buff_;
};

#endif